.TH RATBAGCTL "1" "@version@"
.SH NAME
ratbagctl \- inspect and modify configurable mice
.SH SYNOPSIS
.B ratbagctl [OPTIONS] {COMMAND} ... device
.SH DESCRIPTION
.PP
The
.B ratbagctl
tool queries or changes a device's settings.
.PP
This tool usually needs ratbagd to be running.
.SH OPTIONS
.TP 8
.B \-\-version, \-V
Show program's version number and exit.
.TP 8
.B \-\-verbose, \-v
Print debugging output. Multiple -v options increase the verbosity. For example,
.B \-vvv
will show the protocol output.
.TP 8
.B \-\-nocommit
Do not immediately write the settings to the mouse. This allows to set
multiple parameters in a script, and the last call to
.B ratbagctl
will write them all.
.TP 8
.B \-\-help, \-h
Print the help.
.SH General Commands
.TP 8
.B list
List supported devices (does not take a device argument)
.SH Device Commands
.TP 8
.B info
Print information about a device
.TP 8
.B name
Print the device name
.SH Profile Commands
.TP 8
.B profile active get
Print the currently active profile
.TP 8
.B profile active set N
Set profile N as to the active profile
.TP 8
.B profile N {COMMAND}
Use profile N for COMMAND
.PP
.B Available COMMANDs:
.RS
.TP 8
.B get
Print selected profile information
.TP 8
.B name get
Print the name of the profile
.TP 8
.B name set blah
Set the name of the profile
.TP 8
.B enable
Enable a profile
.TP 8
.B disable
Disable a profile
.TP 8
.B [resolution|dpi|rate|button|led] ...
Use profile N for the specified command.
.RE
.SH Resolution Commands
Resolution commands work on the given profile, or on the active profile if none
is given.
.TP 8
.B resolution active get
Print the currently active resolution
.TP 8
.B resolution active set N
Set resolution N as the active resolution
.TP 8
.B resolution default get
Print the current default resolution
.TP 8
.B resolution default set N
Set resolution N as the default resolution
.TP 8
.B resolution N {COMMAND}
Use resolution N for COMMAND
.PP
.B Available COMMANDs:
.RS
.TP 8
.B get
Print selected resolution
.TP 8
.B [dpi|rate] ...
Use resolution N for the specified command.
.RE
.SH DPI Commands
DPI commands work on the given profile and resolution, or on the active
resolution of the active profile if none are given.
.TP 8
.B dpi get
Print the dpi value
.TP 8
.B dpi get-all
Print the supported dpi values
.TP 8
.B dpi set N
Set the dpi value to N
.SH Rate Commands
Rate commands work on the given profile and resolution, or on the active
resolution of the active profile if none are given.
.TP 8
.B rate get
Print the report rate in ms
.TP 8
.B rate get-all
Print the supported report rates in ms
.TP 8
.B rate set N
Set the report rate in N ms
.SH Button Commands
Button commands work on the given profile, or on the active profile if none is
given.
.TP 8
.B button count
Print the number of buttons
.TP 8
.B button N get
Print the selected button
.TP 8
.B button N action get
Print the button action
.TP 8
.B button N action set button B
Set the button action to button B
.TP 8
.B button N action set special S
Set the button action to special action S
.TP 8
.B button N action set macro ...
Set the button action to the given macro
.PP
.B Macro syntax:
.HP 8
A macro is a series of key events or waiting periods. Keys must be specified
in linux/input-event-codes.h key names.
.RS
.TP 8
.B KEY_A
Press and release 'a'
.TP 8
.B +KEY_A
Press 'a'
.TP 8
.B \-KEY_A
Release 'a'
.TP 8
.B t300
Wait 300ms
.RE
.SH LED Commands
LED commands work on the given profile, or on the active profile if none is
given.
.TP 8
.B led get
Print the current led values
.TP 8
.B led N get
Print the selected LED value
.TP 8
.B led N {COMMAND}
Use led N for COMMAND
.PP
.B Available COMMANDs:
.RS
.TP 8
.B mode [on|off|cycle|breathing]
The mode to set as current
.TP 8
.B color RRGGBB
The color to set as current (the color should be in the hexadecimal format).
.TP 8
.B rate R
The rate to set as current
.TP 8
.B brightness B
The brightness to set as current
.RE
.SH Examples
.TP 8
ratbagctl profile active get eventX
.TP 8
ratbagctl profile 0 resolution active set 4 eventX
.TP 8
ratbagctl profile 0 resolution 1 dpi get eventX
.TP 8
ratbagctl resolution 4 rate get eventX
.TP 8
ratbagctl dpi set 800 eventX
.SH NOTES
.PP
There is currently no guarantee that the output format of
.B ratbagctl
will not change in the future. There should be some stability with the commands
mentioned in this man page, but do not expect it to stay the same.
.SH AUTHORS
.B ratbagctl
was written by David Herrmann, Peter Hutterer and Benjamin Tissoires.
.PP
This manual page was written by Stephen Kitt <skitt@debian.org> for
the Debian GNU/Linux system (but may be used by others).
